home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / rexx / 2020 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: ns2.borg.com!usenet
  2. From: warren@borg.com
  3. Newsgroups: comp.lang.rexx
  4. Subject: Re: LINEIN Question (another one)
  5. Date: 16 Apr 1996 21:46:54 GMT
  6. Organization: Team OS/2
  7. Distribution: inet
  8. Message-ID: <4l14ge$m7m@ns2.borg.com>
  9. References: <4ksfvk$3mpg@news-s01.ny.us.ibm.net> <4l0d7c$moj@cloud9.net>
  10. Reply-To: warren@borg.com (Warren Hall)
  11. NNTP-Posting-Host: l8.borg.com
  12. X-Newsreader: IBM NewsReader/2 v1.9d - NLS
  13.  
  14. In <4l0d7c$moj@cloud9.net>, jalvo@cloud9.net (John Alvord) writes:
  15. >jsbarbe@ibm.net wrote:
  16. >: I can't figure out why my WARP REXX program fails.  It is looping 
  17. >through files 
  18. >: (obtained  with SysFileTree) and using LINEIN to read all the lines of each 
  19. >: file and write them to a single output file.  WORKS GREAT until it hits the 32nd
  20. >: file then it thinks all subsequent files have no lines.  ie ... while lines(readfile) > 1
  21. >: finds a 0.  
  22. >: 
  23. >: First I set READFILE to be the path and file name from the SysFileTree.
  24. >: The read loop is preceded by a LINEIN(READFILE,1,0)   (to make sure it's on 1st line)
  25. >: The LINEIN in the read loop is:   LINEIN(READFILE)
  26. >: 
  27. >: It's NOT the 32nd file, since I can move it to another directory where it is within
  28. >: the first 30 files and it reads fine 
  29. >: 
  30. >: It's not the subdirectory ... I've tried several and they all seem to fail at 32nd file.
  31. >: 
  32. >: Is there some limit of "open files" that I must close after reading?  Do I do that 
  33. >: with a STREAM command?
  34. >: .. I'm stumped.  Any ideas?  Thanks, Steve
  35. >add a x=lineout(fn) after finishing each file processing.
  36. >
  37. >john alvord
  38. His question on the limit of "open files" is:  the number of "file handles" defined in 
  39. your operating system is just that.  Early editions of Warp dropped from the 
  40. common 90 count to the low thirties.
  41.  
  42. In any event, it is always a good practice to close any files that you have finished 
  43. processing.  You can also use the stream command to close your files.
  44.  
  45. Warren
  46. http://www.borg.com/~warren
  47.  
  48.